package com.shanglv.web.proxy.demo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import com.shanglv.common.utils.RestClient;
import com.shanglv.dto.flight.demo.DemoDto;

@Component
public class DemoProxy {
	
	@Value(value = "${fbp.url}/demos")
	private String fbp_url;
	
	@Autowired
	private RestClient client;	

	public DemoDto getDemoById(int id) {
		return client.get(fbp_url + "/" + id, DemoDto.class);
	}

	
}
